package com.talkweb.calendarview;

import ohos.agp.components.AttrSet;
import ohos.agp.components.Component;
import ohos.agp.components.ComponentContainer;
import ohos.agp.components.PageSlider;
import ohos.app.Context;

public class BaseViewPage extends PageSlider {

    public BaseViewPage(Context context) {
        super(context);
    }

    public BaseViewPage(Context context, AttrSet attrSet) {
        super(context, attrSet);
    }

    public BaseViewPage(Context context, AttrSet attrSet, String styleName) {
        super(context, attrSet, styleName);
    }


    @Override
    public int getChildCount() {
        return ((ComponentContainer) super.getComponentAt(0)).getChildCount();
    }

    @Override
    public Component getComponentAt(int index) {
        Component stackComponent = ((ComponentContainer) super.getComponentAt(0)).getComponentAt(index);
        return ((ComponentContainer) stackComponent).getComponentAt(0);
    }

}
